#include<iostream>
using namespace std;

class birthday {
	int year,month,day;
public:
	birthday(int y, int m, int d)  : year(y), month(m), day(d) {
		cout << "gou zao le yi ge birthday" << endl;
	}
	int getYear() const{ return year; }
	int getMonth() const{ return month; }
	int getDay() const{ return day;}
	
	void setYear(int yy) { year = yy; }
	void setMonth(int mm) { month = mm; }
	void setDay(int dd) { day = dd;}

	birthday(const birthday& b);
	void input();
	void show();
	
	
};
//复制构造函数
birthday::birthday(const birthday& b) {
	year = b.year;
	month = b.month;
	day = b.day;
	cout << "fu zhi gou zao yi ge birthday" << endl;

}
void birthday::input() {
	cout << "请录入人员信息" << endl;
	cout << "请录入年：" << endl;
	cin >> year ;
	//setYear(year);
	//cout << getYear() << endl;
	cout << "请录入月：" << endl;
	cin >> month; 
	//setMonth(month);
	//cout << getMonth() << endl;
	cout << "请录入日：" << endl;
	cin >> day;
	//setDay(day); 
	//cout << getDay() << endl;
	
}
void birthday::show() {
	cout << year <<"-" << month << "-" << day << endl;
}

//enum people_sex {male=1,female};
class People {
private:
	birthday bd;
	int number;
	long long id;
	string sex;
public:

	int getNumber() const{ return number; }
	long long getId() const{ return id; }
	string getSex() const{ return sex;}
	
	void setNumber(int nn) { number = nn; }
	void setId(long long ii) { id = ii; }
	void setSex(string ss) { sex = ss;}

	
	void input() {
		string a="";
		bd.input();
		//cout << "请录入人员信息" << endl;
		cout << "请录入编号number：" << endl;
		cin >> number;
		//setYear(number);
		//cout << getNumber() << endl;
		cout << "请录入身份证号id：" << endl;
		cin >> id;
		//setYear(id);
		//cout << getId() << endl;
		cout << "请录入性别sex：" << endl;
		
		cin >> a;
		sex = a;
		//setYear(sex);
		//cout << getSex() << endl;
	}
	void show() {
		bd.show();
		cout <<"日期"<< bd.getYear() <<"-" << bd.getMonth() << "-" << bd.getDay() << endl;
		cout << "编号" << number << "\n身份证号" << id << "\n性别" << sex << endl;
	}
	People(birthday bi, int n, long long i, string s);
};

People::People(birthday bi, int n, long long i, string s) :bd(bi),number(n),id(i),sex(s){
	cout << "构造了一个People" << endl;
}





int main()
{	
	birthday a(2022, 04, 05);
	birthday b(a);
//	a.input();
//	a.show();
	People p(b,123,54564650164,"male");
	p.input();
	p.show();

	
	/*a.setDay(345);
	int b=a.getDay();
	cout << b << endl;*/
}